home *** CD-ROM | disk | FTP | other *** search
/ Aminet 8 / Aminet 8 (1995)(GTI - Schatztruhe)[!][Oct 1995].iso / Aminet / comm / mebbs / stoli10f.lha / SendToLine.AREXX < prev    next >
Text File  |  1994-05-25  |  3KB  |  86 lines

  1. /***************************************************/
  2. /* $VER: sendtoline.rexx  (25 May 1994)            */
  3. /* $Filename: sendtoline.rexx $                    */
  4. /* $Version: 1.00 $                                */
  5. /* $Date: 25 May 1994 $                            */
  6. /* $Creation: 25 May 1994 $                        */
  7. /***************************************************/
  8.  
  9. SIGNAL ON ERROR
  10. SIGNAL ON SYNTAX
  11. SIGNAL ON FAILURE
  12.  
  13. Options results
  14.  
  15. parse arg LineNumber
  16.  
  17. DoorName = "SendToLine"
  18.                                                           
  19. if( ~show( 'l', "mebbsarexx.library" ) )then do           
  20.    if( ~addlib( "mebbsarexx.library", 0, -30, 0 ) )then do
  21.       say "Could not open library"                        
  22.       exit 10                                             
  23.    end                                                    
  24. end
  25.  
  26. SET="OK"
  27.  
  28. call Message DoorName,LineNumber,"",1
  29. call Message DoorName,LineNumber,"",1
  30. call Message DoorName,LineNumber,"Welcome to Send To LineNumber v1.0 Created by Mikael Johansson M6005",1
  31. call Message DoorName,LineNumber,"",1
  32. call Message DoorName,LineNumber,"Thankx goes to Marco Valk for his CLI version of this prg",1
  33. call Message DoorName,LineNumber,"",1
  34. call GetVar DoorName,LineNumber,1
  35. user=result
  36. call Message DoorName,LineNumber,"",1
  37. call Message DoorName,LineNumber,"Hello "||user||"",1
  38. call Message DoorName,LineNumber,"",1
  39. call Prompt DoorName,LineNumber,"Wich Line do you wanna send to ? (0-1/Q) ",2
  40. an=result
  41. ans=compress(an)
  42. if ans="0" then call LI
  43. if ans="1" then call LI
  44. if ans="Q" then call END_IT
  45. if ans="" then call END_IT
  46.  
  47.  
  48. END_IT:
  49. call exit DoorName,LineNumber
  50. exit 0
  51.  
  52. LI:
  53. call Message DoorName,LineNumber,"",1
  54. if ans="0" then do
  55.     call Message DoorName,LineNumber,"Local LineNumber",1
  56.     end
  57. if ans="1" then do
  58.     call Message DoorName,LineNumber,"LineNumber 1",1
  59.     end
  60. call Message DoorName,LineNumber,"",1
  61. call Prompt DoorName,LineNumber,"Enter the message (max 40 chars) ",41
  62. me=result
  63. mes=user" says: "me
  64. string = 'c:run >NIL: MebbsNet:c/sendtoLine '||ans||' "'||mes||'" CLS'
  65. say string
  66. ADDRESS COMMAND string
  67. call Message DoorName,LineNumber,"",1
  68. call message DoorName,LineNumber,"Message was sent to Line "||ans||" ",1
  69. call Message DoorName,LineNumber,"",1
  70. CALL END_IT
  71.  
  72. /* Error Handling */
  73.  
  74. FAILURE:
  75. SYNTAX:
  76. ERROR:
  77. call open(er,"t:error",'W')                  
  78. call writeln(er,"line break : "sigl)         
  79. call writeln(er,"Code       : "errortext(rc))
  80. call close(er)
  81. if SET="OK" then do
  82.     call exit DoorName,LineNumber
  83.     end
  84. exit 10
  85. exit
  86.